/**
 * User: zsquirrel
 * Date: 2020/4/30
 * Time: 9:51 上午
 */
package com.cskaoyan.mall.dao;

import com.cskaoyan.mall.model.*;
import com.cskaoyan.mall.model.bo.GoodsParamBO;
import com.cskaoyan.mall.model.bo.OrderedGoodsInfoBO;
import com.cskaoyan.mall.model.bo.ReplyBO;
import com.cskaoyan.mall.model.bo.SpecBO;
import com.cskaoyan.mall.model.vo.GoodsCommentVO;
import com.cskaoyan.mall.model.vo.GoodsInfoMsgVO;
import com.cskaoyan.mall.model.vo.MessageVO;

import java.util.List;

public interface GoodsDao {
    List<Type> getType();

    List<Goods> getGoodsByType(String typeId);

    int addGoods(GoodsParamBO goodsParamBO);

    void addSpecList(int goodsId, List<Spec> specList);

    void deleteType(String typeId);

    List<Spec> getSpecs(String goodsId);

    Goods getGoodsById(String id);

    void deleteSpec(SpecBO specBO);

    void addSpec(Spec spec);

    void updateGoods(GoodsParamBO paramBO);

    void updateSpecList(List<Spec> updateSpecs);

    void deleteSpec(String id);

    void deleteGoods(String id);

    List<Spec> getSiblingSpecs(Integer goodsDetailId);

    List<MessageVO> getMsg(Integer stateId);

    void reply(ReplyBO replyBO);

    List<Goods> searchGoods(String keyword);

    List<GoodsInfoMsgVO> getAllMsgs(String goodsId);

    List<GoodsCommentVO> getGoodsComment(String goodsId);

    Integer getTotalCommentsCount(String goodsId);

    Integer getPositiveCommentCount(String goodsId);

    void askGoodsMsg(Integer userId, String msg, String goodsId);

    OrderedGoodsInfoBO getOrderedGoodsInfo(Integer goodsDetailId);

    void updateStockNum(Integer goodsNum, Integer goodsDetailId);
}
